﻿<UserControl x:Class="BrowserMasterUI.BrowserImage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ani="clr-namespace:System.Windows.Media.Animation;assembly=PresentationFramework">
    <UserControl.Resources>
        
        <Storyboard x:Key="SelectedSB">
            <DoubleAnimation Name="GrowWidth"
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Width" Duration="{DynamicResource myDuration}" />
            <DoubleAnimation 
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity"
                To="1" Duration="{DynamicResource myDuration}" />

        </Storyboard>
        <Storyboard x:Key="DeSelectedSB">
            <DoubleAnimation 
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Width" Duration="{DynamicResource myDuration}" />
            <DoubleAnimation 
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity"
                To=".35" Duration="{DynamicResource myDuration}" />
        </Storyboard>
        <Storyboard x:Key="InitSelectedSB">
            <DoubleAnimation 
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Width"
                From="1" Duration="{DynamicResource myDuration}" />
            <DoubleAnimation 
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity"
                From="0" To="1" Duration="{DynamicResource myDuration}" />
        </Storyboard>
        <Storyboard x:Key="InitDeSelectedSB">
            <DoubleAnimation 
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Width"
                From="1" Duration="{DynamicResource myDuration}" />
            <DoubleAnimation 
                Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity"
                From="0" To=".35" Duration="{DynamicResource myDuration}" />
        </Storyboard>
    </UserControl.Resources>
    <Border VerticalAlignment="Center" HorizontalAlignment="Center">
        <Image Name="Icon" MouseLeftButtonUp="Icon_MouseLeftButtonUp" />
    </Border>
</UserControl>
